<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>答题详情页</title>
<link rel="stylesheet" type="text/css" href="/Public/Home/css/global.css" />
<link rel="stylesheet" type="text/css" href="/Public/Home/css/manage.css" />
<body class="global_form global_table global_icon global_formList">
<div class="global_head">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<div class="inner">
            <!-- <div class="logo" onclick="window.location.href='/';" id="busi_move">
                <img src="/html/images/global_logo.png" alt="活动树"
                    id="huodongshu_logo" style="">
            </div> -->
            <div class="nav">
                <ul>
                    <li id="id_li_event"><a href="<?php echo U('/Home/index');?>">首页</a></li>
                    <li id="id_li_myevent" class="choose"><a href="<?php echo U('/Home/index/choosePaper');?>">在线答题</a></li>
                    <li id="id_li_account"><a href="<?php echo U('/Home/index/account');?>">个人中心</a></li>
                </ul>
            </div>
            <ul class="login" id="changeclass">
            <?php if($loginName != ''): ?><li><span id="huodongshu_welcome_span"><?php echo ($loginName); ?></span>
                    <a href="<?php echo U('/Home/Check/loginOut',array('from'=>'index'));?>"> | 退出</a>
                </li>
            <?php else: ?>
                 <li class="">
                    <a id="huodongshu_login" href="<?php echo U('/Home/Check/login',array('from'=>'index'));?>">登录 | </a>
                    <a id="huodongshu_register" href="/html/register.html">注册</a>
                </li><?php endif; ?>
            </ul>
</div>
</div>
<div class="global_width survey_details">
  <div class="content"> 
    <div class="box_title end">
    <input type="hidden" name="paper_id" id="paper_id" value="<?php echo ($info['paper_info']['id']); ?>" />
      <h2><?php echo ($info['paper_info']['name']); ?></h2>
      <p><?php echo ($info['paper_info']['description']); ?></p>
      <p>总分：<?php echo ($info['score']); ?> 分</p>
    </div>
    <div class="details" id="details">
    <div id="tem">
        <?php if(count($info['subject_info']) > 0): if(is_array($info['subject_info'])): foreach($info['subject_info'] as $key=>$subInfo): ?><div class="question" type="<?php echo ($subInfo['type']); ?>" title-id="<?php echo ($subInfo['id']); ?>" score="<?php echo ($subInfo['score']); ?>">
                    <h3><?php echo ++$key;?>. <?php echo ($subInfo['title']); ?> <?php if($subInfo['type'] == 1): ?>(单选) <?php else: ?> (多选)<?php endif; ?> (<?php echo ($subInfo['score']); ?>分)
                    </h3>
                    <div class="option">
                    <?php if(count($subInfo['field']) > 0): foreach($subInfo['field'] as $v) { ?>
                          <p>
                          <?php if($subInfo['type'] == 1): if(in_array($v['id'],$subInfo['choose'])){ ?>
                                <input type="radio" name="choice" field-id="<?php echo ($v['id']); ?>" disabled checked />
                            <?php } else { ?>
                                <input type="radio" name="choice" field-id="<?php echo ($v['id']); ?>" disabled />
                            <?php } ?>
                            <?php if ($v['correct'] == 1) { ?><font color="green"><?php } else if($v['correct'] != 1 && in_array($v['id'],$subInfo['choose'])) { ?><font color="red"><?php } else { ?><font><?php } ?>&nbsp;&nbsp;<?php echo ($v['title']); ?></font>
                          <?php else: ?>
                            <?php if(in_array($v['id'],$subInfo['choose'])){ ?>
                                <input type="checkbox" field-id="<?php echo ($v['id']); ?>" disabled checked />
                            <?php } else { ?>
                                <input type="checkbox" field-id="<?php echo ($v['id']); ?>" disabled />
                            <?php } ?>
                            <?php if ($v['correct'] == 1) { ?><font color="green"><?php } else if($v['correct'] != 1 && in_array($v['id'],$subInfo['choose'])) { ?><font color="red"><?php } else { ?><font><?php } ?>&nbsp;&nbsp;<?php echo ($v['title']); ?></font><?php endif; ?>
                            </p>
                            <?php } endif; ?>
                        </div>
                    </div><?php endforeach; endif; endif; ?>
     </div>
      <!-- <div class="save"> <a class="first" href="javascript:void(0);" onclick="save();">提交试卷</a></div> -->
    </div>
  </div>
</div>
<script src="/Public/Static/jquery-1.9.1.min.js"></script>
</body>
</html>